// 定义充值相关接口

// 引入axios实例
import http from '@/utils/request'

// 定义获取产品api
export  let getPro =  () => http.get('/product/get_product',{params:{category_id:'20210827165510715'}})


//  定义下单接口
export  let placeAnOrder = (product_id,quantity) => http.post('/order/pre_order',{product_id,quantity})



// 定义发起支付接口
export  let sendPay = order_id => http.post('/pay/payment',{order_id})



// 定义查询支付接口
export  let queryPay = order_id => http.get('/order/query_order_status',{params:{order_id}})


// 定义查询订单详情接口   如果传参就是获取当前订单详情，如果不传参就是获取所有订单
export  let orderFormStatus = order_id => http.post('/order/get_order',{order_id})

export  let allOrder = () => http.post('/order/get_order')




